/*
 * @Author: tanjunyi@doctorwork.com
 * @Date: 2020-06-15 22:46:13
 * @LastEditors: tanjunyi@doctorwork.com
 * @LastEditTime: 2020-06-15 22:57:23
 * @Description:
 */

import babel from 'rollup-plugin-babel';
import serve from 'rollup-plugin-serve';

export default {
	input: './src/index.js',
	output: {
		file: 'dist/umd/vue.js',
		name: 'Vue',// 打包后全局变量的名字
		format: 'umd', //统一规范
		sourcemap: true, //开启源码调试
	},
	plugins: [
		babel({
			exclude: "node_modules/**"
		}),
		process.env.ENV === 'development' ? serve({
			open: true,
			openPage: '/public/index.html',
			port: 3000,
			contentBase: '',

		}) : null
	]
};